<?php
namespace Home\Model;
use Think\Model;
class MemberModel  extends Model  {
	// protected $tableName = 'wjl';
	// protected $tablePrefix = 'jy_';
	
	//字段映射
	protected $_map = array(	'zhanghu'	=>'M_Account',       
								'xingming'  =>'M_UserName',
								'mima'		=>'M_Password',       
								'xingbie'	=>'M_Sex',
								);
	//自动验证
    protected $_validate = array(       
						array('M_Account','require','用户名必须填写222'),
						array('M_Account','require','用户名不能重复aa',0,'unique',1),
	);
	
	//自动完成
	protected $_auto = array (	
					array('M_Password','md5',3,'function') ,	//完成了对M_Password的MD5加密
					array('M_RegisterTime','time',1,'function'),//赋值注册时间
					array('M_LastLoginTime','time',3,'function'),//赋值登录时间
	);

	
}